package com.fdb.efp.nls.service.impl.sx.zxruleforbd;

import com.fdb.cdp.pboc.service.vo.BdZxInfoVO;
import com.fdb.efp.rule.service.vo.ReqBdCreditRuleVo;
import org.springframework.stereotype.Service;

/**
 * 近一个月查询次数>=10次，（贷款申请+信用卡申请） <br>
 * <p>
 * 0.1:caoxin:2019/7/10 17:03: <br>
 * @author caoxin
 * @version 0.1
 * @date 2019/7/10 17:03
 * @since 2019/7/10 17:03
 */
@Service("bDZxRule08")
public class BDZxRule08 implements BdZxRuleInterface{
    @Override
    public void executeRule(ReqBdCreditRuleVo reqBdCreditRuleVo,BdZxInfoVO bdZxInfoVO) {
        int sum = 0;
        int sum1 = getCountAsInt(bdZxInfoVO.getZxRcy1MLoanQueryCnt());
        int sum2 = getCountAsInt(bdZxInfoVO.getZxRcy1MCreCardQueryCnt());
        if (sum1 + sum2 >= 10){
            sum = 1;
        }
        reqBdCreditRuleVo.setRule08(sum);
    }
}
